namespace CSharpPro._1103;

using System;

public class User
{
    private string _username;
    private string _password;
    
    public string Username
    {
        get { return _username; }
        set
        {
            if (!string.IsNullOrEmpty(value))
                _username = value;
        }
    }

    public string Password
    {
        get { return _password; }
        set
        {
            if (!string.IsNullOrEmpty(value))
                _password = value;
        }
    }
    
    public User() { }

    public User(string username, string password)
    {
        Username = username;
        Password = password;
    }
    
    public override string ToString()
    {
        return $"用户名: {Username}";
    }
}